﻿#parse("partials/header.html") #parse("partials/sidebar.html")

<style>
    div#datalist_filter
    {
        display: none;
    }
    div#datalist_length
    {
        display: none;
    }
    .mws-table thead
    {
        margin-top: -10px;
    }
</style>


<script type="text/javascript">
    $(document).ready(function () {
        var oTable = $('#datalist').dataTable({
            "bSort": false,
            "sPaginationType": "full_numbers",
            "bProcessing": false,
            "bServerSide": true,
            "bFilter": true,
            "sAjaxSource": "tablelistdoctor",
            "aoColumns": [
                                { "mDataProp": "Id" },
                                { "mDataProp": "DoctorCode" },
                                { "mDataProp": "DoctorName" },
                                { "mDataProp": "spec" }
                            ],
            "aoColumnDefs": [
                                {
                                    "fnRender": function (o) {
                                         return "<center><a class='tooltip' title='Select Doctor' href='/schedule/schedulerview/scheduledoctor/?id=" + o.aData['Id'] + "'doctorName='" + o.aData['DoctorName'] + "' ><img src='/images/Icons/table.png'/></a> </center>";
                         
                                    },
                                    "aTargets": [0]
                                }
                        ],
            "fnServerData": function (sSource, aoData, fnCallback) {
                aoData.push({ "name": "doctorname", "value": $('#doctorname').val() });
                aoData.push({ "name": "code", "value": $('#code').val() });
                aoData.push({ "name": "specialist", "value": $('#specialist').val() });

                jQuery.ajax({
                    "dataType": 'json',
                    "type": "GET",
                    "url": "tablelistdoctor",
                    "data": aoData,
                    "success": fnCallback
                });
            }
        });
        $('#buttonSearch').click(function () {
            oTable.fnDraw();
        });

    });
    //Add event click on list doctor
    $(".dok").live('click', function (event) {
        var doctorCode = $(this).attr("doctorId");
        var doctorName = $(this).attr("doctorName");
        var doctorName = $(this).attr("specialist");
        window.location = "/schedule/schedulerview/scheduledoctor/?id=" + doctorCode;
    });

</script>
<!-- Main Container Start -->
<div id="mws-container" class="clearfix">
    <!-- Inner Container Start -->
    <div class="container">
        <!-- Panels Start -->
        <div class="mws-panel grid_8 mws-collapsible">
            <div class="title-caption">
                <h5>$headerinformation - Doctor Schedule</h5>
            </div>
            <div class="mws-panel-header">
                <span class="mws-i-24 i-calendar-today">Doctor Schedule </span>
            </div>
            <div class="mws-panel-body">
                <div class="mws-panel-toolbar top clearfix">
                    <ul>
                        <li><a class="mws-ic-16 ic-accept" href="/schedule/schedulerview/" title="Accept">List
                            Doctor</a></li>
                    </ul>
                </div>
                <div class="mws-form" action="#">
                    <div class="mws-form-inline">
                        <div class="mws-form-row">
                            <label>
                                Specialist</label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-2-8 alpha">
                                        <div class="mws-form-item">
                                            <input type="text" class="mws-textinput mws-autocomplete"  id="specialist"
                                                name="specialist" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="mws-form-row">
                            <label>
                                Doctor Name</label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-2-8 alpha">
                                        <div class="mws-form-item">
                                            <input type="text" class="mws-textinput mws-autocomplete"  id="doctorname"
                                                name="doctorname" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="mws-form-row">
                            <label>
                                Doctor Code</label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-2-8 alpha">
                                        <div class="mws-form-item">
                                            <input type="text" class="mws-textinput mws-autocomplete"  id="code"
                                                name="code" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <br />
                    <div class="mws-button-row">
                        <input id="buttonSearch" type="submit" value="Search" class="mws-button red" />
                    </div>
                </div>
                <table cellpadding="0" cellspacing="0" border="0" class="fullwidth mws-table" id="datalist"
                    width="80%">
                    <thead>
                        <tr>
                            <th style="width: 10px; text-align: center">
                                Actions
                            </th>
                            <th style="width: 100px; text-align: center">
                                CODE
                            </th>
                            <th style="text-align: center">
                                Doctor Name
                            </th>
                            <th style="text-align: center">
                                Specialist
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td colspan="7" class="dataTables_empty">
                                <!--<img src="${rooturl}Images/Custom/252.gif" />-->
                            </td>
                        </tr>
                    </tbody>
                </table>
                <div class="clear">
                </div>
            </div>
        </div>
        <!-- Panels End -->
    </div>
</div>
<!-- Main Container End -->
#parse("partials/footer.html") 